{include file="public/header" /}
<div class="page">

    <form id="goods_class_form" method="post" action="{:url('Goodinquiry/store')}" name="articleClassForm">
        <table class="ds-default-table">
            <tbody>
                <tr class="noborder">
                <td class="required w150"><label class="validation" for="member_name">{$Think.lang.inquiry_name}:</label></td>
                <td class="vatop rowform"><input type="text" value="{$inquiry.inquiry_name|default=''}"  name="inquiry_name" id="name" class="txt">
                <td class="vatop tips"></td>
            </tr>
            </tbody>
            <tfoot>
            <tr class="tfoot" style="text-align: center;">
                <td colspan="15" ><input style="display:inline-block;border:none;padding:0px 18px;height:38px;line-height:38px;border-radius:3px;background-color:#419dfd;color:#fff!important;vertical-align:middle;text-align:center;cursor:pointer;font-size: 14px;" class="btn" type="submit" value="{$Think.lang.ds_submit}"/></td>
            </tr>
            </tfoot>
        </table>
    </form>
</div>
<script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/mlselection.js" charset="utf-8"></script>
<script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/jquery.mousewheel.js"></script>
<script>
    $(function () {
        jQuery.validator.addMethod("checkFCodePrefix", function (value, element) {
            return this.optional(element) || /^[a-zA-Z]+$/.test(value);
        }, '<i class="iconfont">&#xe64c;</i>{$Think.lang.prompt_information1}');

        $('#goods_class_form').validate({
            errorPlacement: function (error, element) {
                error.appendTo(element.parent().parent().find('td:last'));
            },
            rules: {
                inquiry_name: {
                    required: true,
                    remote   : {
                        url :"{:url('Brand/ajax','branch=check_inquiry_type_name')}",
                        type:'get',
                        data:{
                            brand_name : function(){
                                return $('#name').val();
                            },
                        }
                    }
                },
            },
            messages: {
                inquiry_name: {
                    required: '店铺分类名称不能为空',
                    remote   : '店铺分类名称不可以重复哦~'
                },
            }
        });
    });

    var typeScroll = 0;

    function type_scroll(o) {
        var id = o.val();
        if (!$('#type_dt_' + id).is('dt')) {
            return false;
        }
        $('#type_div').scrollTop(-typeScroll);
        var sp_top = $('#type_dt_' + id).offset().top;
        var div_top = $('#type_div').offset().top;
        $('#type_div').scrollTop(sp_top - div_top);
        typeScroll = sp_top - div_top;
    }

    gcategoryInit('gcategory');
</script>



